<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Unit Test: XML Module</title>
    <script type="text/javascript" src="../../scripts/dd/dd.js"></script>
    <script type="text/javascript">
    dd({
        modules: [
            "test",
            "http",
            "xml"
        ]
    });
    dd(function()
    {
        dd.xml({
            url:"file.xml",
            success:function()
            {
                dd.log("File = file.xml");
                dd.log(this.text, dd.log.responseSuccess);
                dd.log("Output:");
                dd.log("movies[0].movie[0].getAttribute('id') = " + this.xml.movies[0].movie[0].getAttribute('id'), dd.log.response);
                dd.log("movies[0].movie[0].name[0].innerText = " + this.xml.movies[0].movie[0].name[0].innerText, dd.log.response);
            }
        });
        dd.xml({
            url:"corrupt.xml",
            success: function()
            {
                dd.log("You should not see this...", dd.log.error);
            },
            failure:function()
            {
                dd.log("File = corrupt.xml");
                dd.log(this.text, dd.log.responseFailure);
                dd.log("Output:");
                dd.log("The request failed.", dd.log.error);
            }
        });
    });
    </script>
</head>
<body>
    Loading...
</body>
</html>
